package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.TravelCollect;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface TravelCollectMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TravelCollect record);

    TravelCollect selectByPrimaryKey(Integer id);

    List<TravelCollect> selectAll();

    int updateByPrimaryKey(TravelCollect record);

    TravelCollect getCollectByUserId(@Param("userId") Long userId, @Param("travelId") Long travelId,@Param("state")Long state);

    TravelCollect selectExist(@Param("userId") Long userId, @Param("travelId") Long travelId);

    void insertCollect(TravelCollect entity);

    void changeState(@Param("userId") Long userId, @Param("travelId") Long travelId, @Param("time") Date time, @Param("state") boolean state);

    List<TravelCollect> query(@Param("qo") QueryObject qo, @Param("userId") Long userId);
}